home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 4368 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  826 b 

  1. Path: ccnet.com!usenet
  2. From: fladung@emf.net (Ed Fladung)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Multiple Labels in a #ifdef
  5. Date: Fri, 02 Feb 1996 22:56:37 GMT
  6. Organization: CCnet Communications (510-988-7140 guest)
  7. Message-ID: <4eu4mt$9n9@ccnet2.ccnet.com>
  8. References: <4erh8d$86u@ccnet2.ccnet.com>
  9. Reply-To: fladung@emf.net
  10. NNTP-Posting-Host: 199.217.9.50
  11. X-Newsreader: Forte Free Agent 1.0.82
  12.  
  13. fladung@emf.net (Fast Eddie) wrote:
  14.  
  15. >Is is possible to use multiple labels in a #ifdef?
  16.  
  17. >This is what I would like to do:
  18.  
  19. >#ifdef (DEBUG1 | DEBUG2 | DEBUG3)
  20.  
  21. >/* define something if DEBUG1 or DEBUG2 or DEBUG3 is defined */
  22.  
  23. >#endif
  24.  
  25. Hate to answer my own submission but...
  26.  
  27. I'm not sure this works on all compilers but it works on VMS c.
  28.  
  29. #if defined DEBUG1 || defined DEBUG2  ||  defined DEBUG3
  30.  
  31. /* Do something */
  32.  
  33. #endif
  34.  
  35.  
  36.  
  37.